import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Agua here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Agua extends Trampas
{
    /**
     * Act - do whatever the Agua wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    private int imagen=1;
    public void act() 
    {
        // Add your action code here.
        super.cargaTrmpas();
        ponImagen();
    }
     /**
     * Pon Imagen se encarga de poner una secuencia de imagenes
     * @param No lleva toma
     */
    
    private void ponImagen()
    {
      switch(imagen)
      {
        case 1:
                setImage(trampa[3]);
                imagen=2;
        break;
        case 2:
                setImage(trampa[4]);
                imagen=3;
        break;
        case 3:
                setImage(trampa[5]);
                imagen=1;
        break;
      }
    }
}
